﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>从海关网站获取公司信息</title>
    <script src="../../../SFramework/jquery-1.6.2.min.js"></script>
    <script src="../../../SFramework/boot.js"></script>
    <link href="../../../SFramework/miniui/themes/blue/skin.css" rel="stylesheet" />
</head>
<body>
    <div style="width: 100%; height: auto; margin-left: 5px;" bodystyle="padding:0;border:0;">
        <form id="form1" method="post">
            <table style="width: 100%;">
                <tr>
                    <td class="theader">
                        企业分级标志:
                    </td>
                    <td>
                        <input id="com_iden" name="com_iden" allowinput="true" shownullitem="false" class="mini-textbox"
                               style="width: 100%;" />
                    </td>
                    <td class="theader">
                        海关编码:
                    </td>
                    <td>
                        <input id="zucode" name="zucode" allowinput="true" shownullitem="false" class="mini-textbox"
                               style="width: 100%;" />
                    </td>
                </tr>
                <tr>
                    <td class="theader">
                        企业名称：
                    </td>
                    <td>
                        <input id="znamec" name="znamec" allowinput="true" shownullitem="false" class="mini-textbox"
                               style="width: 100%;" />
                    </td>
                    <td class="theader">
                        报关类别：
                    </td>
                    <td>
                        <input id="customer_cate" name="customer_cate" allowinput="true" shownullitem="false"
                               class="mini-textbox" style="width: 100%;" />
                    </td>
                </tr>
                <tr>
                    <td class="theader">
                        通关期限:
                    </td>
                    <td>
                        <input id="exp_dt" name="exp_dt" class="mini-datepicker" style="width: 200px;" format="yyyy-MM-dd"
                               showtime="true" />
                    </td>
                    <td class="theader">
                        有效日期:
                    </td>
                    <td>
                        <input id="tgexp_dt" name="tgexp_dt" class="mini-datepicker" style="width: 200px;"
                               format="yyyy-MM-dd" />
                    </td>
                </tr>
                <tr>
                    <td class="theader">
                        进口类型：
                    </td>
                    <td>
                        <input id="ientry_type" name="ientry_type" allowinput="true" shownullitem="false"
                               class="mini-combobox" style="width: 100%;" url="/extendpage/data/jsondata.aspx?entity=v_data_base_dictionary_detail&condition=code='sys_jinchukouleixing'"
                               idfield="id" textfield="name" valuefield="value" />
                    </td>
                    <td class="theader">
                        出口类型：
                    </td>
                    <td>
                        <input id="oentry_type" name="oentry_type" allowinput="true" shownullitem="false"
                               class="mini-combobox" style="width: 100%;" url="/extendpage/data/jsondata.aspx?entity=v_data_base_dictionary_detail&condition=code='sys_jinchukouleixing'"
                               idfield="id" textfield="name" valuefield="value" />
                    </td>
                </tr>
                <tr>
                    <td class="theader">
                        中心：
                    </td>
                    <td>
                        <input id="zx_yn" name="zx_yn" allowinput="true" shownullitem="false"
                               class="mini-combobox" style="width: 100%;" url="/extendpage/data/jsondata.aspx?entity=v_data_base_dictionary_detail&condition=code='sys_zhongxin'"
                               idfield="id" textfield="name" valuefield="value" />
                    </td>
                    <td class="theader">
                        停用
                    </td>
                    <td>
                        <input id="stop_yn" name="stop_yn" allowinput="true" shownullitem="false" class="mini-checkbox" truevalue="1" falsevalue="0"
                               style="width: 100%;" />
                    </td>
                </tr>
                <tr>
                    <td class="theader">
                        验证码:
                    </td>
                    <td>
                        <img id="img_vcode" name="img_vcode" src="http://www.haiguan.info/vcode.aspx?f=12">
                        <input id="vcocd" name="vcocd" allowinput="true" shownullitem="false" class="mini-textbox"
                               style="width: 100px;" />
                        <a id="btnSave" onclick="fnSaveCustomer()" class="mini-button">获取</a>
                    </td>
                </tr>


                <tr>
                    <td colspan="4">
                        <iframe id="iframe1" scrolling="auto" frameborder="0" src="http://www.haiguan.info/onlinesearch/gateway/CompanyInfo.aspx" style="width:100%;height:200px; margin:0px;"></iframe>
                    </td>
                </tr>
            </table>
        </form>
    </div>
</body>
</html>
<script type="text/javascript">
    var HI_LOGIN_URL = "http://www.haiguan.info/ajaxpro/SCEC.HaiguanInfo.Single,SCEC.HaiguanInfo.ashx";
    var HI_TG_URL = "http://www.haiguan.info/onlinesearch/gateway/CompanyInfo.aspx";
    var HI_AUTH = "http://www.haiguan.info/vcode.aspx?f=12";
    debugger;
    var cc = window.frames["iframe1"].document;
    mini.parse();
    function fnSaveCustomer() {

        //$.ajax({
        //    url: HI_TG_URL,
        //    type: 'GET',
        //    data: {
        //        'ctl00$MainContent$txtCode': '遵义天蕴纺织有限责任公司',
        //        'ctl00$MainContent$code_op': mini.get("vcocd").getValue()
        //    },
        //    dataType: 'JSONP',//here            
        //    headers: {
        //        "Access-Control-Allow-Origin": "*",
        //        "Access-Control-Allow-Headers": "X-Requested-With"
        //    },
        //    success: function (data) {
        //        alert("xx");
        //    }

        //});


    }
</script>
